import Vue from 'vue'
import Vuex from 'vuex'
import createVuexPersistedState from 'vuex-persistedstate'
import user from './modules/user'
import cart from './modules/cart'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: { user, cart },
  plugins: [
    createVuexPersistedState({
      key: 'vue2-mobile-2306'
    })
  ]
})
